<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="srcPath" value="${redis:getSysConfig('sysFileVisitRoot_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 查看首页中间分类左右两侧数据详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/shopHomeMiddleCategoryBilateral/getShopHomeMiddleCategoryBilateralObj.sjson",
            data: {bilateralId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTableBilateral");
                /**设置展示信息**/
                $("#d_imageUrl").html("<img id='uploadImg_detail_1' class='uploadImg' onMouseOver='showDetailBigImage(1,3,3,0)'  onMouseOut='showDetailRebackImage(1,1,1)' src='${uploadPath}/"+data.imageUrl+"' onerror='this.src=\"${srcPath}/common/images/mrbj.png\"' width='50px' height='50px' />");
                <c:forEach items="${redis:getHomeKeyBook('middleBilateral')}" var="kb">
                if(data.type==${kb.value}){
                    $("#d_type").html("${kb.name}");
                }
                </c:forEach>
                if(data.isShow==1){
                    $("#d_isShow").html("<font class='color_001'>已显示</font>");
                }else{
                    $("#d_isShow").html("<font class='color_002'>未显示</font>");
                }

                if(data.createTime!=""&&data.createTime!=undefined){
                    $("#d_createTime").html(new Date(data.createTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                $("#d_publishUser").html(data.publishUser);
                if(data.updateTime!=""&&data.updateTime!=undefined){
                    $("#d_updateTime").html(new Date(data.updateTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                $("#d_modifyUser").html(data.modifyUser);
                $("#d_title").html(data.title);
                $("#d_synopsis").html(data.synopsis);
                $("#d_link").html(data.link);
                $("#d_sortCode").html(data.sortCode);
            }
        });
    }
</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">首页中间分类左右两侧数据详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTableBilateral" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">图片:&nbsp;&nbsp;</td>
						<td class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_imageUrl"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">标题:&nbsp;&nbsp;</td>
						<td class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_title"></span></td>
					</tr>
					<tr><td class="toright_td" width="150px">描述:&nbsp;&nbsp;</td>
						<td class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_synopsis"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">链接:&nbsp;&nbsp;</td>
						<td class="toleft_td" width="250px" >&nbsp;&nbsp;<span id="d_link"></span></td>
						<td class="toright_td" width="150px">类型:&nbsp;&nbsp;</td>
						<td class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_type"></span></td>
					</tr>
					<tr>
						<td class="toright_td" >是否显示:&nbsp;&nbsp;</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_isShow"></span></td>
						<td class="toright_td" >排序:&nbsp;&nbsp;</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_sortCode"></span></td>
					</tr>
					<tr>
						<td class="toright_td"  >创建时间:&nbsp;&nbsp;</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_createTime"></span></td>
						<td class="toright_td"  >创建人:&nbsp;&nbsp;</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_publishUser"></span></td>
					</tr>
					<tr>
						<td class="toright_td"  >修改时间:&nbsp;&nbsp;</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_updateTime"></span></td>
						<td class="toright_td"  >修改人:&nbsp;&nbsp;</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_modifyUser"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
